import { PersistGate } from "redux-persist/integration/react"
import "simplebar/src/simplebar.css"
import ReactDOM from "react-dom"
import { BrowserRouter } from "react-router-dom"
import { HelmetProvider } from "react-helmet-async"
import React from "react"
import App from "./App"
import * as serviceWorker from "./serviceWorker"
import reportWebVitals from "./reportWebVitals"
import store from "./store"
import { Provider } from "react-redux"
import "./locales/initI18n"
import "./styles/helper.scss"
import "./locales/initI18n"

ReactDOM.render(
  <HelmetProvider>
    <BrowserRouter>
      <Provider store={store.store}>
        <PersistGate loading={null} persistor={store.persistor}>
          <App />
        </PersistGate>
      </Provider>
    </BrowserRouter>
  </HelmetProvider>,
  document.getElementById("root")
)

// If you want to enable client cache, register instead.
serviceWorker.unregister()

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals()
